<%@page import="com.joypard.framework.Constants"%>
<%@page import="com.joypard.platform.entity.security.resource.Resource"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<style>
.nav { /*background:red;测试高度*/
	background:
		url("${$res_path_resources}/theme/default/images/top_nav_bg.png")
		repeat-x scroll 0 -20px;
	font-size: 12px;
	width: 100%;
	padding-top: 3px;
	padding-left: 2px;
	padding-bottom: 3px;
	font-size: 12px;
	border-bottom: 1px solid #C0C0C0;
	height: 15px;
}

.nav a {
	color: #00007f;
}

.span-next {
	cursor: pointer;
}

.aaaa {
	background-image:
		url("${$res_path_resources}/theme/default/images/current_position_icon.gif");
	background-position: center left;
	background-repeat: no-repeat;
	padding-left: 18px;
}
</style>
<script type="text/javascript">
	$(function() {
		$(".span-imgnext").mouseover(function() {
			$(this).addClass("span-imgnext-activate")
		}).mouseout(function() {
			$(this).removeClass("span-imgnext-activate")
		});
	});
</script>
<div class="nav">
	<div class="aaaa">
		当前位置： <a href="#">系统首页</a>
		<%
			Resource resource = (Resource) request.getAttribute("requestResource");
			if (resource != null) {
				List<Resource> resources = new ArrayList<Resource>();
				Resource parentResource = resource.getParentResource();

				while (parentResource != null) {
					resources.add(parentResource);
					parentResource = parentResource.getParentResource();
				}
				resources.add(resource);

				for (int i = 0; i < resources.size(); i++) {
					out.print(">><a href=\"javascript:void(" + resources.get(i).getCode() + ")\">" + resources.get(i).getName() + "</a>");
				}
			}
		%>
	</div>
</div>
